Skip to main content

Overview

Introduction to an Order

An order request is composed of metadata, items and shipping information. Check the different request and response versions for details.

Information required to place orders

Orders can be placed by a POST request to either version of the API endpoints. A request to place an order is comprised of the following data:

  1. Authentication headers
  2. Create order payload

Authentication

A bearer token has to be passed in the Authorization header. This header can be accesed by calling the Authentication API Endpoint, which requires the 'clientId' and 'secret' to be sent in request body. On success, the response will include the access_token key.

Authorization: "Bearer <your-access-token>"

For more details, refer to Authentication.

Create order payload

Check the different request and response versions for details on the payload. For the values specific to a productConfiguration, you can contact your account manager to share the create order payload for that specific productConfigurationId.

danger

For orders placed with country=USA, the region field must be included in Shipping address.

Creating a test order

To make sure the account and webhook have been successfully registered, we suggest to send few test orders before going live. The steps to create a test order are the same as a real one mentioned above. In case of a test order, the fakeOrder key in the payload will have true value.

warning

The fakeOrder flag, which is a part of the create-order-payload, has to be set as true (otherwise the order placed will be produced) .